package qf.service.serviceImpl;

import qf.dao.GoodsDao;
import qf.pojo.Goods;
import qf.service.GoodsService;

import java.util.List;

/**
 * @author 86198
 * @version V1.0
 * @Project Java_qf
 * @Package qf.service.serviceImpl
 * @Description:
 * @Date 2022/5/24 20:13
 */
public class GoodsServiceImpl implements GoodsService {
    private GoodsDao goodsdao;
    public GoodsServiceImpl(GoodsDao goodsdao){
        this.goodsdao=goodsdao;
    }
    @Override
    public List<Goods> showGoods() {
        return  goodsdao.showGoods();
    }

    @Override
    public void addGoods(Goods goods) {
        goodsdao.insertGoods(goods);
    }

    @Override
    public Goods selectGoodsBYID(Integer id) {
        return goodsdao.selectGoodsBYID(id);
    }
}
